from nameremoved.comics.models import Comic, Contribution
from nameremoved.comics import present_image
from nameremoved.helpers import render_with_requestcontext
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.contrib.admin.views.decorators import staff_member_required

@staff_member_required
def view_comic_image(request, id):
    """observe the image for a comic, unrestricted by date"""
    return present_image(Comic.comics.get(pk=int(id)))

@staff_member_required
def report(request):
    """make the unused suggestions report"""
    c = {
        'contribs': Contribution.objects.all().filter(
            flagged = False,
            contribution_type = "suggested",
        )
    }
    return render_with_requestcontext("admin/comics/report.html",c,request)
